export const initEnv = (envConf: Record<string, any>): ImportMetaEnv => {
  const ret = {};

  Object.keys(envConf).forEach(envName => {
    let value = envConf[envName];

    value = value === 'true' ? true : value === 'false' ? false : value;

    if (envName === 'VITE_PORT') {
      value = Number(value);
    }

    (ret as any)[envName] = value;
  });

  return ret as ImportMetaEnv;
};
